b4b: Move the changes to initialize the task decomposition from mpi_scan to main development#3666
b4b: Move the changes to initialize the task decomposition from mpi_scan to main development#3666ekluzek wants to merge 103 commits into
Conversation
Conflicts: src/cpl/share_esmf/lnd_set_decomp_and_domain.F90
…_and_domain_from_readmesh
…_readmesh subroutine
…e destroyed so remove the destroy for the distgrid, and the two meshes, this runs but doesn't seem to lower memory
…e about leaving the distgrid around, and also delete the meshes as it seems to work with this in place
Conflicts: src/main/decompInitMod.F90
Conflicts: src/cpl/share_esmf/lnd_set_decomp_and_domain.F90
…ted error messaging Conflicts: src/main/decompInitMod.F90
…he subname, create new internal subroutines in decompInit_lnd for allocate, clean, and check errors, move the check errors part to the first thing done Conflicts: src/main/decompInitMod.F90
…array sizes are set before allocates, initialize some decompMod values to invalid for error checking, add error checking to get_proc_bounds/get_proc_clumps, seperate out allocate for gindex to own allocate method, as it has be be done later after decomp is done, these are all improvements in ESCOMP#3448 Conflicts: src/main/decompInitMod.F90
… add error handling of nsegspc, don't check endCohort in get_proc_bounds and get_clump_bounds as doesn't seem to be set Conflicts: src/main/decompInitMod.F90
…etup/clean for each DecompInit test, move the decomp_mod_clean to decompMod and use it for the decompInit tests Conflicts: src/main/decompInitMod.F90 src/self_tests/TestDecompInit.F90 --- removed
…re to the regular operation Conflicts: src/main/decompInitMod.F90
…mpi-serial Conflicts: src/main/decompInitMod.F90
Conflicts: src/main/decompInitMod.F90
…sor_type structure, and start adding a couple methods to help get them set
…for mpiscan and verify it, allocate the new procinfo gi and gj indices, make sure they are set, compiles but fails at run Conflicts: src/main/decompInitMod.F90
…the call expects all subgrid levels to be set
Conflicts: src/main/decompInitMod.F90
…ocate for the local task, this works for the serial case Conflicts: src/main/decompInitMod.F90
… clump_pproc for the setting of ggidx Conflicts: src/main/decompInitMod.F90
…moved for the final version Conflicts: src/main/decompInitMod.F90
…s for serial mode Conflicts: src/main/decompInitMod.F90
…global clumps Conflicts: src/self_tests/TestDecompInit.F90
… the log that aren't needed anymore Conflicts: src/main/decompInitMod.F90
…iculty or be slower for PE layouts that aren't a power of 2
|
Running aux_clm on Derecho and Izumi. Will also run decomp_init and uhr_decomp_init before merging in. |
|
A few tests fail for odd grids/PE layouts that I'll need to look into: ERS_D_Mmpi-serial_Ld5.5x5_amazon.I2000Clm50FatesRs.derecho_gnu.clm-FatesCold (RUN) |
|
0.8 for Sprint 31 |
|
@ekluzek Please ping me again to review once you have those tests working. |
…, since the ESMF objects are inside a particular if statement
|
OK, all aux_clm tests are working now. The decomp_init testlists were already working, but I might send other testlists just to make sure there isn't some other strange configuration that has problems. |
|
fates testlist ran as expected on both Izumi and Derecho. The ctsm_sci test list on Derecho has only three tests left to finish, but outside of those everything ran as expected. |
|
@ekluzek I think I'm going to need you to walk me through this. Your PR title and description mainly just talk about moving work from some other git branch to here. What does this PR actually do? |
OK, let me update the PR description to go over what it actually does. And I'll try to lay it out in a way that doesn't require a lot of insider technical knowledge. I'd kind of like to have this in before b4b-dev on next Thursday, so maybe I'll schedule a quick code review for Wednesday. I think I'm up for that, but I also might have to change last minute with what's going on in the family. And if it has to be the next cycle that wouldn't be the worst thing to happen either. |
|
OK @briandobbins and @samsrabin I've updated the description at the top so it tells more about what the code changes mean. Let me know if anything is unclear or missing and I'll fix it. We'll meet next week to finalize anything left to do, and hopefully it can come in pretty quickly after that. |
samsrabin
left a comment
There was a problem hiding this comment.
@ekluzek walked @briandobbins and me through the changes, and it all sounds great! We didn't go through the actual CODE changes, but I don't think it would be helpful for me to do so anyway. Approving.
Co-authored-by: Sam Rabin <samrabin@ucar.edu>
briandobbins
left a comment
There was a problem hiding this comment.
Thanks for the walkthrough; given the passing tests, and the higher degree of understanding, I'm approving without walking through all the code changes. Glad to have this in, and thanks for the hard work on it!
|
I met yesterday with @samsrabin and @briandobbins and they approved this coming in. I'll update and rerun the testing again and then bring it in. We did think it's important to run all the testing I did previously, especially the ctsm_sci testlist as that will run the CAM VR grids. |
1 similar comment
|
I met yesterday with @samsrabin and @briandobbins and they approved this coming in. I'll update and rerun the testing again and then bring it in. We did think it's important to run all the testing I did previously, especially the ctsm_sci testlist as that will run the CAM VR grids. |
|
The aux_clm testing ran as expected. So I'm running these testlist now: ctsm_sci, decomp_init, uhr_decomp_init. If that all goes as expected I'll do the merge. |
|
The ctsm_sci testlist ran as expected (with one test still in the queue). The decomp_init test all passed as expected. The uhr_decomp_init test had one test run as expected, one that's in the queue and this one failed: SMS_Ln1_PL.mpasa3p75_mpasa3p75_mt13.I2000Clm45Sp.derecho_intel.clm-for_testing_fastsetup_bypassrun--clm-mpasa3p75 ( RUN) It ran out of the hour wallclock time it was given. This is concerning because based on previous timings an hour should have been overly generous. From looking at log files it looks like it failed in datm and likely hung so it didn't die until it reached the wallclock limit. |
Description of changes
This moves the core code changes to initialize the processor decomposition from the mpi_scan branch in #3469 to b4b-dev. This removes some of the changes for memory checking and additional self testing as well as some of the additional timers that don't look useful now.
I created two previous branches before I created the process in #3665 where I worked out the details to NOT make this have too many commits and be hard to do. I also figured out how to remove merge commits as they need special handling, and usually aren't wanted in a case like this. Another way to do this would be to do this outside of git, which might have been similar length as the final version, but could've missed some important changes.
The actual code changes is that the task/thread decomposition determined at initialization was updated to be based on mpi_scan, rather than using a lot of complex custom code that was a much higher order based on the number of tasks. Methods to calculate the 2D global indicies for a point was added so that it could be displayed on endrun calls. processor_type and clump_type were moved towards an Object-Oriented (OO) programming style, more error checking added, including checking that the decomposion is correct, deallocates some initialization memory that isn't needed.
calc_ijindices_from_full_global_index
New methods for processor_type: InitAllocate , calc_global_index_fromij,
calc_globalxy_indices
New method for clump_type: Init
Add new data: nglob_x, nglob_y (global 2D indices)
Add more error checking
Add only_gridelll optional argument to get_proc_bounds (needed for calls used before the subgrid levels are set from calling decompInit_glcp)
clumps in clumps%Init, use mpi_scan rather than higher order method,
add error checking, and asserts that decomposition is correct,
reset clumps data to -1 for non-local processors to show that we don't need it (shows Dimension clumps object by clumps_proc rather than global nclumps #3466 can be done)
add some timers
Changes of note for users:
Changes of note for developers:
Specific notes
Contributors other than yourself, if any: John Dennis
CTSM Issues Fixed (include github issue #):
Fixes #3370
Fixes #3368
Fixes #3672
Some work on #3448
Some work on #3476
Are answers expected to change (and if so in what way)? No (the determination of the PE decomposition is identical as well)
Any User Interface Changes (namelist or namelist defaults changes)? No
Does this create a need to change or add documentation? Did you do so? No No
Changes to testing:
use the set_decomp_info to allocate the PE decompostion,
change test size so ni/nj isn't symmetrical to test that size checks are correct
set more decompMod data in set_decomp_info,
returns after endrun added for unittests
Testing performed, if any: ran standard testing
The mpi_scan testing branch has had all the test lists run for it: aux_clm, ctsm_sci, decomp_init, decomp_init_uhr, and fates